﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XYS.Core.Util.Helper;

namespace XYS.Core.Util
{
    public static partial class Extention
    {
        /// <summary>
        /// 计算文件MD5
        /// </summary>
        /// <param name="fileInfo"></param>
        /// <returns></returns>
        public static string GetMD5(this FileInfo fileInfo)
        {
            var fileMD5 = EncryptHelper.MD5Stream(fileInfo.FullName);
            return fileMD5;
        }
    }
}
